# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-xyzservices
_pkgname=${pkgname#python-}
pkgver=2024.6.0
pkgrel=3
pkgdesc='Provides a repository of available XYZ services offering raster basemap tiles.'
arch=('any')
url='https://github.com/geopandas/xyzservices'
license=('BSD-3-Clause')
depends=('python')
makedepends=('python-setuptools-scm' 'python-wheel' 'python-build'
             'python-installer')
source=("https://github.com/geopandas/xyzservices/releases/download/$pkgver/$_pkgname-$pkgver.tar.gz")
sha512sums=('0dd6cc725a4a7d2986d34da0d2995a75d52673e049c5b205bb824a2d02b0e1a74476444a8f64220e8c9e2d6783b404be484ecbb20b87bb5ee4c21a1a0f0276ba')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --no-isolation
}

package() {
  cd "$_pkgname-$pkgver"

  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

